package 工厂模式;

public class 工厂模式 {
    public static void main(String[] args) {
        ShapeFactory circleFactory=new CircleFactory();
        ShapeFactory rectangleFactory=new RectangleFactory();
        Shape circle = circleFactory.create();
        circle.draw();
        Shape rectangle = rectangleFactory.create();
        rectangle.draw();
    }
}